|
GET consignments/{id}/documents
Get a list of documents for a
consignment or cross-dock shipment with a given identifier.
Only Proof of Delivery (POD) documents
are available by default. Please reach out to your Expeditors
representative for access to additional documents.
Note:
the documentId returned in the response containing the callback
url is related to the bearer token used when the callback
url was requested. If the bearer token has expired,
you will need to request the callback URL again.
Example Request
GET
/consignments/5555/documents?encode=false
Authorization: Ejr2YotnFZFEjr1zCsicMWpAAotnFZFEjr1zCsic
X-Consumer-ID: TEST_CONSUMER_ID
X-Consumer-Custom-ID: TEST_CUSTOM_CONSUMER_ID
Host: localhost:8080 |
Example Curl Request
$
curl 'https://localhost:8080/consignments/5555/documents?encode=false'
-i -X GET \
-H
'Authorization: Ejr2YotnFZFEjr1zCsicMWpAAotnFZFEjr1zCsic'
\
-H
'X-Consumer-ID: TEST_CONSUMER_ID' \
-H
'X-Consumer-Custom-ID: TEST_CUSTOM_CONSUMER_ID' |
Headers
Header |
Purpose |
Values |
Required? |
Authorization |
Provide bearer token |
Bearer "{token}" |
Y |
Parameters
Parameter |
Purpose |
Values |
Required? |
id |
Identifier for a consignment or cross-dock shipment |
URL-encoded string, 1 to 12 characters |
Y |
encode |
A boolean flag that indicates whether the document
contents should be encoded as a base64 string in the
response or a download callback URL should be provided |
Boolean |
N |
Response
The response format is JSON; see Data
Types - Consignment and Cross-Dock - Documents for data
types.
Example Response
200
OK
Content-Type: application/json
Content-Length: 392
[ {
"documentType"
: "POD-Proof of Delivery",
"group"
: "",
"label"
: "",
"fileSize"
: "0K",
"numberOfPages"
: "1",
"downloadCallbackUrl"
: "https://api.expeditors.com/tracking/v2/consignments/5555/documents/AWzuzHXANd9erOsPSt3QT88p9-14vzmvPM0Oa41Pu_qG5OjieGy8zJ3H6aQ_HEVj39j3W9b-czckaU3-XG-A1IPo/download",
"expeditorsReference"
: "123",
"consignmentId"
: "5555"
} ] |
200
OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
[
{
"documentType":
"POD-Proof of Delivery",
"group":
"",
"label":
"LYKES0002560279",
"fileSize":
"76K",
"numberOfPages":
"1",
"base64EncodedDocument":
"JVBERi0xLjQgE5pQG5tJMiAwIG9iaiAgPDwvTGVuZ3RoIDMgMCBSIC9Ga..............",
"expeditorsReference":
"42I0209239",
"consignmentId":
""
}
] |
|